package torque.generated;


import java.math.BigDecimal;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.ObjectUtils;
import org.apache.torque.TorqueException;
import org.apache.torque.map.TableMap;
import org.apache.torque.om.BaseObject;
import org.apache.torque.om.ComboKey;
import org.apache.torque.om.DateKey;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.om.StringKey;
import org.apache.torque.om.Persistent;
import org.apache.torque.util.Criteria;
import org.apache.torque.util.Transaction;





/**
 * 
 *
 * This class was autogenerated by Torque on:
 *
 * [Wed Oct 19 10:31:46 CEST 2011]
 *
 * You should not use this class directly.  It should not even be
 * extended all references should be to Objetdanstrolldanspartie
 */
public abstract class BaseObjetdanstrolldanspartie extends BaseObject
{
    /** Serial version */
    private static final long serialVersionUID = 1319013106508L;

    /** The Peer class */
    private static final ObjetdanstrolldanspartiePeer peer =
        new ObjetdanstrolldanspartiePeer();


    /** The value for the nomtroll field */
    private String nomtroll;

    /** The value for the idpartie field */
    private int idpartie;

    /** The value for the xdepart field */
    private int xdepart;

    /** The value for the ydepart field */
    private int ydepart;

    /** The value for the tour field */
    private int tour;

    /** The value for the equipe field */
    private boolean equipe;


    /**
     * Get the Nomtroll
     *
     * @return String
     */
    public String getNomtroll()
    {
        return nomtroll;
    }


    /**
     * Set the value of Nomtroll
     *
     * @param v new value
     */
    public void setNomtroll(String v) throws TorqueException
    {

        if (!ObjectUtils.equals(this.nomtroll, v))
        {
            this.nomtroll = v;
            setModified(true);
        }


        if (aTrolldanspartie != null && !ObjectUtils.equals(aTrolldanspartie.getNomtroll(), v))
        {
            aTrolldanspartie = null;
        }

    }

    /**
     * Get the Idpartie
     *
     * @return int
     */
    public int getIdpartie()
    {
        return idpartie;
    }


    /**
     * Set the value of Idpartie
     *
     * @param v new value
     */
    public void setIdpartie(int v) throws TorqueException
    {

        if (this.idpartie != v)
        {
            this.idpartie = v;
            setModified(true);
        }


        if (aTrolldanspartie != null && !(aTrolldanspartie.getIdpartie() == v))
        {
            aTrolldanspartie = null;
        }

    }

    /**
     * Get the Xdepart
     *
     * @return int
     */
    public int getXdepart()
    {
        return xdepart;
    }


    /**
     * Set the value of Xdepart
     *
     * @param v new value
     */
    public void setXdepart(int v) throws TorqueException
    {

        if (this.xdepart != v)
        {
            this.xdepart = v;
            setModified(true);
        }


        if (aObjetdanspartie != null && !(aObjetdanspartie.getXdepart() == v))
        {
            aObjetdanspartie = null;
        }

    }

    /**
     * Get the Ydepart
     *
     * @return int
     */
    public int getYdepart()
    {
        return ydepart;
    }


    /**
     * Set the value of Ydepart
     *
     * @param v new value
     */
    public void setYdepart(int v) throws TorqueException
    {

        if (this.ydepart != v)
        {
            this.ydepart = v;
            setModified(true);
        }


        if (aObjetdanspartie != null && !(aObjetdanspartie.getYdepart() == v))
        {
            aObjetdanspartie = null;
        }

    }

    /**
     * Get the Tour
     *
     * @return int
     */
    public int getTour()
    {
        return tour;
    }


    /**
     * Set the value of Tour
     *
     * @param v new value
     */
    public void setTour(int v) 
    {

        if (this.tour != v)
        {
            this.tour = v;
            setModified(true);
        }


    }

    /**
     * Get the Equipe
     *
     * @return boolean
     */
    public boolean getEquipe()
    {
        return equipe;
    }


    /**
     * Set the value of Equipe
     *
     * @param v new value
     */
    public void setEquipe(boolean v) 
    {

        if (this.equipe != v)
        {
            this.equipe = v;
            setModified(true);
        }


    }

    



    private Trolldanspartie aTrolldanspartie;

    /**
     * Declares an association between this object and a Trolldanspartie object
     *
     * @param v Trolldanspartie
     * @throws TorqueException
     */
    public void setTrolldanspartie(Trolldanspartie v) throws TorqueException
    {
        if (v == null)
        {
            setNomtroll((String) null);
        }
        else
        {
            setNomtroll(v.getNomtroll());
        }
        if (v == null)
        {
            setIdpartie( 0);
        }
        else
        {
            setIdpartie(v.getIdpartie());
        }
        aTrolldanspartie = v;
    }


    /**
     * Returns the associated Trolldanspartie object.
     * If it was not retrieved before, the object is retrieved from
     * the database
     *
     * @return the associated Trolldanspartie object
     * @throws TorqueException
     */
    public Trolldanspartie getTrolldanspartie()
        throws TorqueException
    {
        if (aTrolldanspartie == null && (!ObjectUtils.equals(this.nomtroll, null) && this.idpartie != 0))
        {
            aTrolldanspartie = TrolldanspartiePeer.retrieveByPK(this.nomtroll, this.idpartie);
        }
        return aTrolldanspartie;
    }

    /**
     * Return the associated Trolldanspartie object
     * If it was not retrieved before, the object is retrieved from
     * the database using the passed connection
     *
     * @param connection the connection used to retrieve the associated object
     *        from the database, if it was not retrieved before
     * @return the associated Trolldanspartie object
     * @throws TorqueException
     */
    public Trolldanspartie getTrolldanspartie(Connection connection)
        throws TorqueException
    {
        if (aTrolldanspartie == null && (!ObjectUtils.equals(this.nomtroll, null) && this.idpartie != 0))
        {
            aTrolldanspartie = TrolldanspartiePeer.retrieveByPK(this.nomtroll, this.idpartie, connection);
        }
        return aTrolldanspartie;
    }

    /**
     * Provides convenient way to set a relationship based on a
     * ObjectKey, for example
     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
     *
     * Note: It is important that the xml schema used to create this class
     * maintains consistency in the order of related columns between
     * objetdanstrolldanspartie and trolldanspartie.
     * If for some reason this is impossible, this method should be
     * overridden in <code>Objetdanstrolldanspartie</code>.
     */
    public void setTrolldanspartieKey(ObjectKey key) throws TorqueException
    {
        SimpleKey[] keys = (SimpleKey[]) key.getValue();

        setNomtroll(keys[0].toString());

        setIdpartie(((NumberKey) keys[1]).intValue());
    }




    private Objetdanspartie aObjetdanspartie;

    /**
     * Declares an association between this object and a Objetdanspartie object
     *
     * @param v Objetdanspartie
     * @throws TorqueException
     */
    public void setObjetdanspartie(Objetdanspartie v) throws TorqueException
    {
        if (v == null)
        {
            setIdpartie( 0);
        }
        else
        {
            setIdpartie(v.getIdpartie());
        }
        if (v == null)
        {
            setXdepart( 0);
        }
        else
        {
            setXdepart(v.getXdepart());
        }
        if (v == null)
        {
            setYdepart( 0);
        }
        else
        {
            setYdepart(v.getYdepart());
        }
        aObjetdanspartie = v;
    }


    /**
     * Returns the associated Objetdanspartie object.
     * If it was not retrieved before, the object is retrieved from
     * the database
     *
     * @return the associated Objetdanspartie object
     * @throws TorqueException
     */
    public Objetdanspartie getObjetdanspartie()
        throws TorqueException
    {
        if (aObjetdanspartie == null && (this.idpartie != 0 && this.xdepart != 0 && this.ydepart != 0))
        {
            aObjetdanspartie = ObjetdanspartiePeer.retrieveByPK(this.idpartie, this.xdepart, this.ydepart);
        }
        return aObjetdanspartie;
    }

    /**
     * Return the associated Objetdanspartie object
     * If it was not retrieved before, the object is retrieved from
     * the database using the passed connection
     *
     * @param connection the connection used to retrieve the associated object
     *        from the database, if it was not retrieved before
     * @return the associated Objetdanspartie object
     * @throws TorqueException
     */
    public Objetdanspartie getObjetdanspartie(Connection connection)
        throws TorqueException
    {
        if (aObjetdanspartie == null && (this.idpartie != 0 && this.xdepart != 0 && this.ydepart != 0))
        {
            aObjetdanspartie = ObjetdanspartiePeer.retrieveByPK(this.idpartie, this.xdepart, this.ydepart, connection);
        }
        return aObjetdanspartie;
    }

    /**
     * Provides convenient way to set a relationship based on a
     * ObjectKey, for example
     * <code>bar.setFooKey(foo.getPrimaryKey())</code>
     *
     * Note: It is important that the xml schema used to create this class
     * maintains consistency in the order of related columns between
     * objetdanstrolldanspartie and objetdanspartie.
     * If for some reason this is impossible, this method should be
     * overridden in <code>Objetdanstrolldanspartie</code>.
     */
    public void setObjetdanspartieKey(ObjectKey key) throws TorqueException
    {
        SimpleKey[] keys = (SimpleKey[]) key.getValue();

        setIdpartie(((NumberKey) keys[0]).intValue());

        setXdepart(((NumberKey) keys[1]).intValue());

        setYdepart(((NumberKey) keys[2]).intValue());
    }
   
        
    private static List fieldNames = null;

    /**
     * Generate a list of field names.
     *
     * @return a list of field names
     */
    public static synchronized List getFieldNames()
    {
        if (fieldNames == null)
        {
            fieldNames = new ArrayList();
            fieldNames.add("Nomtroll");
            fieldNames.add("Idpartie");
            fieldNames.add("Xdepart");
            fieldNames.add("Ydepart");
            fieldNames.add("Tour");
            fieldNames.add("Equipe");
            fieldNames = Collections.unmodifiableList(fieldNames);
        }
        return fieldNames;
    }

    /**
     * Retrieves a field from the object by field (Java) name passed in as a String.
     *
     * @param name field name
     * @return value
     */
    public Object getByName(String name)
    {
        if (name.equals("Nomtroll"))
        {
            return getNomtroll();
        }
        if (name.equals("Idpartie"))
        {
            return new Integer(getIdpartie());
        }
        if (name.equals("Xdepart"))
        {
            return new Integer(getXdepart());
        }
        if (name.equals("Ydepart"))
        {
            return new Integer(getYdepart());
        }
        if (name.equals("Tour"))
        {
            return new Integer(getTour());
        }
        if (name.equals("Equipe"))
        {
            return new Boolean(getEquipe());
        }
        return null;
    }

    /**
     * Set a field in the object by field (Java) name.
     *
     * @param name field name
     * @param value field value
     * @return True if value was set, false if not (invalid name / protected field).
     * @throws IllegalArgumentException if object type of value does not match field object type.
     * @throws TorqueException If a problem occurs with the set[Field] method.
     */
    public boolean setByName(String name, Object value )
        throws TorqueException, IllegalArgumentException
    {
        if (name.equals("Nomtroll"))
        {
            // Object fields can be null
            if (value != null && ! String.class.isInstance(value))
            {
                throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
            }
            setNomtroll((String) value);
            return true;
        }
        if (name.equals("Idpartie"))
        {
            if (value == null || ! (Integer.class.isInstance(value)))
            {
                throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
            }
            setIdpartie(((Integer) value).intValue());
            return true;
        }
        if (name.equals("Xdepart"))
        {
            if (value == null || ! (Integer.class.isInstance(value)))
            {
                throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
            }
            setXdepart(((Integer) value).intValue());
            return true;
        }
        if (name.equals("Ydepart"))
        {
            if (value == null || ! (Integer.class.isInstance(value)))
            {
                throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
            }
            setYdepart(((Integer) value).intValue());
            return true;
        }
        if (name.equals("Tour"))
        {
            if (value == null || ! (Integer.class.isInstance(value)))
            {
                throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
            }
            setTour(((Integer) value).intValue());
            return true;
        }
        if (name.equals("Equipe"))
        {
            if (value == null || ! (Boolean.class.isInstance(value)))
            {
                throw new IllegalArgumentException("setByName: value parameter was null or not a Boolean object.");
            }
            setEquipe(((Boolean)value).booleanValue());
            return true;
        }
        return false;
    }

    /**
     * Retrieves a field from the object by name passed in
     * as a String.  The String must be one of the static
     * Strings defined in this Class' Peer.
     *
     * @param name peer name
     * @return value
     */
    public Object getByPeerName(String name)
    {
        if (name.equals(ObjetdanstrolldanspartiePeer.NOMTROLL))
        {
            return getNomtroll();
        }
        if (name.equals(ObjetdanstrolldanspartiePeer.IDPARTIE))
        {
            return new Integer(getIdpartie());
        }
        if (name.equals(ObjetdanstrolldanspartiePeer.XDEPART))
        {
            return new Integer(getXdepart());
        }
        if (name.equals(ObjetdanstrolldanspartiePeer.YDEPART))
        {
            return new Integer(getYdepart());
        }
        if (name.equals(ObjetdanstrolldanspartiePeer.TOUR))
        {
            return new Integer(getTour());
        }
        if (name.equals(ObjetdanstrolldanspartiePeer.EQUIPE))
        {
            return new Boolean(getEquipe());
        }
        return null;
    }

    /**
     * Set field values by Peer Field Name
     *
     * @param name field name
     * @param value field value
     * @return True if value was set, false if not (invalid name / protected field).
     * @throws IllegalArgumentException if object type of value does not match field object type.
     * @throws TorqueException If a problem occurs with the set[Field] method.
     */
    public boolean setByPeerName(String name, Object value)
        throws TorqueException, IllegalArgumentException
    {
      if (ObjetdanstrolldanspartiePeer.NOMTROLL.equals(name))
        {
            return setByName("Nomtroll", value);
        }
      if (ObjetdanstrolldanspartiePeer.IDPARTIE.equals(name))
        {
            return setByName("Idpartie", value);
        }
      if (ObjetdanstrolldanspartiePeer.XDEPART.equals(name))
        {
            return setByName("Xdepart", value);
        }
      if (ObjetdanstrolldanspartiePeer.YDEPART.equals(name))
        {
            return setByName("Ydepart", value);
        }
      if (ObjetdanstrolldanspartiePeer.TOUR.equals(name))
        {
            return setByName("Tour", value);
        }
      if (ObjetdanstrolldanspartiePeer.EQUIPE.equals(name))
        {
            return setByName("Equipe", value);
        }
        return false;
    }

    /**
     * Retrieves a field from the object by Position as specified
     * in the xml schema.  Zero-based.
     *
     * @param pos position in xml schema
     * @return value
     */
    public Object getByPosition(int pos)
    {
        if (pos == 0)
        {
            return getNomtroll();
        }
        if (pos == 1)
        {
            return new Integer(getIdpartie());
        }
        if (pos == 2)
        {
            return new Integer(getXdepart());
        }
        if (pos == 3)
        {
            return new Integer(getYdepart());
        }
        if (pos == 4)
        {
            return new Integer(getTour());
        }
        if (pos == 5)
        {
            return new Boolean(getEquipe());
        }
        return null;
    }

    /**
     * Set field values by its position (zero based) in the XML schema.
     *
     * @param position The field position
     * @param value field value
     * @return True if value was set, false if not (invalid position / protected field).
     * @throws IllegalArgumentException if object type of value does not match field object type.
     * @throws TorqueException If a problem occurs with the set[Field] method.
     */
    public boolean setByPosition(int position, Object value)
        throws TorqueException, IllegalArgumentException
    {
    if (position == 0)
        {
            return setByName("Nomtroll", value);
        }
    if (position == 1)
        {
            return setByName("Idpartie", value);
        }
    if (position == 2)
        {
            return setByName("Xdepart", value);
        }
    if (position == 3)
        {
            return setByName("Ydepart", value);
        }
    if (position == 4)
        {
            return setByName("Tour", value);
        }
    if (position == 5)
        {
            return setByName("Equipe", value);
        }
        return false;
    }
     
    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     *
     * @throws Exception
     */
    public void save() throws Exception
    {
        save(ObjetdanstrolldanspartiePeer.DATABASE_NAME);
    }

    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     * Note: this code is here because the method body is
     * auto-generated conditionally and therefore needs to be
     * in this file instead of in the super class, BaseObject.
     *
     * @param dbName
     * @throws TorqueException
     */
    public void save(String dbName) throws TorqueException
    {
        Connection con = null;
        try
        {
            con = Transaction.begin(dbName);
            save(con);
            Transaction.commit(con);
        }
        catch(TorqueException e)
        {
            Transaction.safeRollback(con);
            throw e;
        }
    }

    /** flag to prevent endless save loop, if this object is referenced
        by another object which falls in this transaction. */
    private boolean alreadyInSave = false;
    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.  This method
     * is meant to be used as part of a transaction, otherwise use
     * the save() method and the connection details will be handled
     * internally
     *
     * @param con
     * @throws TorqueException
     */
    public void save(Connection con) throws TorqueException
    {
        if (!alreadyInSave)
        {
            alreadyInSave = true;



            // If this object has been modified, then save it to the database.
            if (isModified())
            {
                if (isNew())
                {
                    ObjetdanstrolldanspartiePeer.doInsert((Objetdanstrolldanspartie) this, con);
                    setNew(false);
                }
                else
                {
                    ObjetdanstrolldanspartiePeer.doUpdate((Objetdanstrolldanspartie) this, con);
                }
            }

            alreadyInSave = false;
        }
    }



    private final SimpleKey[] pks = new SimpleKey[4];
    private final ComboKey comboPK = new ComboKey(pks);

    /**
     * Set the PrimaryKey with an ObjectKey
     *
     * @param key
     */
    public void setPrimaryKey(ObjectKey key) throws TorqueException
    {
        SimpleKey[] keys = (SimpleKey[]) key.getValue();
        setNomtroll(keys[0].toString());
        setIdpartie(((NumberKey)keys[1]).intValue());
        setXdepart(((NumberKey)keys[2]).intValue());
        setYdepart(((NumberKey)keys[3]).intValue());
    }

    /**
     * Set the PrimaryKey using SimpleKeys.
     *
     * @param nomtroll String
     * @param idpartie int
     * @param xdepart int
     * @param ydepart int
     */
    public void setPrimaryKey( String nomtroll, int idpartie, int xdepart, int ydepart)
        throws TorqueException
    {
        setNomtroll(nomtroll);
        setIdpartie(idpartie);
        setXdepart(xdepart);
        setYdepart(ydepart);
    }

    /**
     * Set the PrimaryKey using a String.
     */
    public void setPrimaryKey(String key) throws TorqueException
    {
        setPrimaryKey(new ComboKey(key));
    }

    /**
     * returns an id that differentiates this object from others
     * of its class.
     */
    public ObjectKey getPrimaryKey()
    {
        pks[0] = SimpleKey.keyFor(getNomtroll());
        pks[1] = SimpleKey.keyFor(getIdpartie());
        pks[2] = SimpleKey.keyFor(getXdepart());
        pks[3] = SimpleKey.keyFor(getYdepart());
        return comboPK;
    }
 

    /**
     * Makes a copy of this object.
     * It creates a new object filling in the simple attributes.
     * It then fills all the association collections and sets the
     * related objects to isNew=true.
     */
    public Objetdanstrolldanspartie copy() throws TorqueException
    {
        return copy(true);
    }

    /**
     * Makes a copy of this object using connection.
     * It creates a new object filling in the simple attributes.
     * It then fills all the association collections and sets the
     * related objects to isNew=true.
     *
     * @param con the database connection to read associated objects.
     */
    public Objetdanstrolldanspartie copy(Connection con) throws TorqueException
    {
        return copy(true, con);
    }

    /**
     * Makes a copy of this object.
     * It creates a new object filling in the simple attributes.
     * If the parameter deepcopy is true, it then fills all the
     * association collections and sets the related objects to
     * isNew=true.
     *
     * @param deepcopy whether to copy the associated objects.
     */
    public Objetdanstrolldanspartie copy(boolean deepcopy) throws TorqueException
    {
        return copyInto(new Objetdanstrolldanspartie(), deepcopy);
    }

    /**
     * Makes a copy of this object using connection.
     * It creates a new object filling in the simple attributes.
     * If the parameter deepcopy is true, it then fills all the
     * association collections and sets the related objects to
     * isNew=true.
     *
     * @param deepcopy whether to copy the associated objects.
     * @param con the database connection to read associated objects.
     */
    public Objetdanstrolldanspartie copy(boolean deepcopy, Connection con) throws TorqueException
    {
        return copyInto(new Objetdanstrolldanspartie(), deepcopy, con);
    }
  
    /**
     * Fills the copyObj with the contents of this object.
     * The associated objects are also copied and treated as new objects.
     *
     * @param copyObj the object to fill.
     */
    protected Objetdanstrolldanspartie copyInto(Objetdanstrolldanspartie copyObj) throws TorqueException
    {
        return copyInto(copyObj, true);
    }

  
    /**
     * Fills the copyObj with the contents of this object using connection.
     * The associated objects are also copied and treated as new objects.
     *
     * @param copyObj the object to fill.
     * @param con the database connection to read associated objects.
     */
    protected Objetdanstrolldanspartie copyInto(Objetdanstrolldanspartie copyObj, Connection con) throws TorqueException
    {
        return copyInto(copyObj, true, con);
    }
  
    /**
     * Fills the copyObj with the contents of this object.
     * If deepcopy is true, The associated objects are also copied
     * and treated as new objects.
     *
     * @param copyObj the object to fill.
     * @param deepcopy whether the associated objects should be copied.
     */
    protected Objetdanstrolldanspartie copyInto(Objetdanstrolldanspartie copyObj, boolean deepcopy) throws TorqueException
    {
        copyObj.setNomtroll(nomtroll);
        copyObj.setIdpartie(idpartie);
        copyObj.setXdepart(xdepart);
        copyObj.setYdepart(ydepart);
        copyObj.setTour(tour);
        copyObj.setEquipe(equipe);

        copyObj.setNomtroll((String)null);
        copyObj.setIdpartie( 0);
        copyObj.setXdepart( 0);
        copyObj.setYdepart( 0);

        if (deepcopy)
        {
        }
        return copyObj;
    }
        
    
    /**
     * Fills the copyObj with the contents of this object using connection.
     * If deepcopy is true, The associated objects are also copied
     * and treated as new objects.
     *
     * @param copyObj the object to fill.
     * @param deepcopy whether the associated objects should be copied.
     * @param con the database connection to read associated objects.
     */
    protected Objetdanstrolldanspartie copyInto(Objetdanstrolldanspartie copyObj, boolean deepcopy, Connection con) throws TorqueException
    {
        copyObj.setNomtroll(nomtroll);
        copyObj.setIdpartie(idpartie);
        copyObj.setXdepart(xdepart);
        copyObj.setYdepart(ydepart);
        copyObj.setTour(tour);
        copyObj.setEquipe(equipe);

        copyObj.setNomtroll((String)null);
        copyObj.setIdpartie( 0);
        copyObj.setXdepart( 0);
        copyObj.setYdepart( 0);

        if (deepcopy)
        {
        }
        return copyObj;
    }
    
    

    /**
     * returns a peer instance associated with this om.  Since Peer classes
     * are not to have any instance attributes, this method returns the
     * same instance for all member of this class. The method could therefore
     * be static, but this would prevent one from overriding the behavior.
     */
    public ObjetdanstrolldanspartiePeer getPeer()
    {
        return peer;
    }

    /**
     * Retrieves the TableMap object related to this Table data without
     * compiler warnings of using getPeer().getTableMap().
     *
     * @return The associated TableMap object.
     */
    public TableMap getTableMap() throws TorqueException
    {
        return ObjetdanstrolldanspartiePeer.getTableMap();
    }


    public String toString()
    {
        StringBuffer str = new StringBuffer();
        str.append("Objetdanstrolldanspartie:\n");
        str.append("Nomtroll = ")
           .append(getNomtroll())
           .append("\n");
        str.append("Idpartie = ")
           .append(getIdpartie())
           .append("\n");
        str.append("Xdepart = ")
           .append(getXdepart())
           .append("\n");
        str.append("Ydepart = ")
           .append(getYdepart())
           .append("\n");
        str.append("Tour = ")
           .append(getTour())
           .append("\n");
        str.append("Equipe = ")
           .append(getEquipe())
           .append("\n");
        return(str.toString());
    }
}
